package com.example.api.admin.controller;

import com.example.api.admin.logic.IUserLogis;
import com.example.common.core.annotation.NoLoginAuth;
import com.example.common.core.result.Result;
import com.example.entity.api.admin.user.LoginVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/user")
@CrossOrigin
public class UserController {

    @Autowired
    private IUserLogis userLogis;

    /**
     * 登录获取token
     * @param loginVo
     * @return
     */
    @PostMapping("/login")
    @NoLoginAuth
    public Result index(@Validated @RequestBody LoginVo loginVo){
        if (null == loginVo.getId() || null == loginVo.getUsername()){
            return null;
        }
//        userLogis.
        return Result.success();
    }


}
